package com.greendragon.web.action; 


import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/** 
 * @author wulibin, exceptsky@gmail.com, 2011-9-16 下午10:55:03
 * 
 */
public class BaseAction extends ActionSupport{
	private static final long serialVersionUID = 549148458756119920L;
	
	public String execute() throws Exception {
		return SUCCESS;
	}
	
    protected ActionContext getActionContext() {
        return ActionContext.getContext();
    }

    protected Map<String, Object> getSession() {
        return getActionContext().getSession();
    }
    
	public HttpServletRequest getRequest(){
		return ServletActionContext.getRequest();
	}
	
	public HttpServletResponse getResponse(){
		return ServletActionContext.getResponse();
	}
}
 